home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / cat3 / GetJustify.3 < prev    next >
Text File  |  1994-09-20  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4. Tk_GetJustify(3)      Tk Library Procedures
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      Tk_GetJustify, Tk_NameOfJustify - translate between  strings
  12.      and justification styles
  13.  
  14. SYNOPSIS
  15.      #include <tk.h>
  16.  
  17.      Tk_Justify
  18.      Tk_GetJustify(_i_n_t_e_r_p, _s_t_r_i_n_g, _j_u_s_t_i_f_y_P_t_r)
  19.  
  20.      char *
  21.      Tk_NameOfJustify(_j_u_s_t_i_f_y)
  22.  
  23. ARGUMENTS
  24.      Tcl_Interp   *_i_n_t_e_r_p       (in)      Interpreter to use  for
  25.                                           error reporting.
  26.  
  27.      char         *_s_t_r_i_n_g       (in)      String containing  name
  28.                                           of  justification style
  29.                                           (``left'',   ``right'',
  30.                                           ``center'',          or
  31.                                           ``fill'').
  32.  
  33.      int          *_j_u_s_t_i_f_y_P_t_r   (out)     Pointer to location  in
  34.                                           which  to store justify
  35.                                           value corresponding  to
  36.                                           _s_t_r_i_n_g.
  37.  
  38.      Tk_Justify   _j_u_s_t_i_f_y       (in)      Justification     style
  39.                                           (one   of   the  values
  40.                                           listed below).
  41. _________________________________________________________________
  42.  
  43.  
  44. DESCRIPTION
  45.      Tk_GetJustify  places  in  *_j_u_s_t_i_f_y_P_t_r  the  justify   value
  46.      corresponding to _s_t_r_i_n_g.  This value will be one of the fol-
  47.      lowing:
  48.  
  49.      TK_JUSTIFY_LEFT
  50.           Means that the text on each line should  start  at  the
  51.           left edge of the line;  as a result, the right edges of
  52.           lines may be ragged.
  53.  
  54.      TK_JUSTIFY_RIGHT
  55.           Means that the text on each  line  should  end  at  the
  56.           right edge of the line;  as a result, the left edges of
  57.           lines may be ragged.
  58.  
  59.      TK_JUSTIFY_CENTER
  60.  
  61.  
  62.  
  63. Tk                                                              1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Tk_GetJustify(3)      Tk Library Procedures
  71.  
  72.  
  73.  
  74.           Means that the text on each line  should  be  centered;
  75.           as a result, both the left and right edges of lines may
  76.           be ragged.
  77.  
  78.      TK_JUSTIFY_FILL
  79.           Means that the text on each line should  start  at  the
  80.           left  edge  of the line and end at the right edge, with
  81.           the sizes of the spaces in the line  adjusted  to  make
  82.           this work.
  83.  
  84.      Under normal circumstances the return value  is  TCL_OK  and
  85.      _i_n_t_e_r_p is unused.  If _s_t_r_i_n_g doesn't contain a valid justif-
  86.      ication style or an abbreviation of one of these names, then
  87.      an  error  message is stored in _i_n_t_e_r_p->_r_e_s_u_l_t, TCL_ERROR is
  88.      returned, and *_j_u_s_t_i_f_y_P_t_r is unmodified.
  89.  
  90.      Tk_NameOfJustify is the logical  inverse  of  Tk_GetJustify.
  91.      Given  a  justify  value  it  returns a statically-allocated
  92.      string corresponding to _j_u_s_t_i_f_y.  If _j_u_s_t_i_f_y isn't  a  legal
  93.      justify  value,  then  ``unknown  justification  style''  is
  94.      returned.
  95.  
  96.  
  97. KEYWORDS
  98.      center, fill, justification, string
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Tk                                                              2
  130.  
  131.  
  132.  
  133.